<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="renderer" content="webkit" />
		<meta name="robots" content="index, follow" />
		<title>报修单---状态:<?php if($data['status']==0)echo '待处理';if($data['status']==1)echo '处理中';if($data['status']==2)echo '已处理完成';?></title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<meta name="author" content="order by website" />
		<script type="text/javascript" src="__XIAOHE__/js/jquery.min.js"></script>
		<script src="__XIAOHE__/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
		 crossorigin="anonymous"></script>
		<script src="__XIAOHE__/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="__XIAOHE__/css/bootstrap.min.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="__XIAOHE__/css/style.css" />
		<link rel="stylesheet" type="text/css" href="__XIAOHE__/css/swiper.min.css" />


		<!-- 引入样式文件 -->
		<link rel="stylesheet" type="text/css" href="__XIAOHE__/yuye/index.css">
		<!-- 引入 Vue 和 Vant 的 JS 文件XiaoHe QQ496631085  -->
		<script src="__XIAOHE__/yuye/vue.min.js"></script>
		<script src="__XIAOHE__/yuye/vant.min.js"></script>
	</head>
	<body>
		<div class="row">
			<div class="col-xs-12" style="padding: 0;">
				<div class="Suggestions1" style="background-image: url(__XIAOHE__/images/Suggestions1.jpg);">
					<div class="Repair1">
						<div class="Repair1a">
							<img src="__XIAOHE__/images/Repair1.jpg" >
						</div>
						<div class="Repair1b">
							<input type="text" id="name" value="报修人员：{$data.name}"  placeholder="报修人员"/>
						</div>
					</div>
					
					<div class="Repair1">
						<div class="Repair1a">
							<img src="__XIAOHE__/images/Repair2.jpg" >
						</div>
						<div class="Repair1b">
							<input type="text" id="tel" value="联系电话：{$data.tel}" placeholder="联系电话"  style="width:70%"  />
							<span><a href="tel:{$data.tel}">拨打电话</a></span>
						</div>
					</div>
					<div class="Repair1">
						<div class="Repair1a">
							<img src="__XIAOHE__/images/Repair3.jpg" >
						</div>
						<div class="Repair1b">
							<input type="text" id="ltdtel" value="公司电话：{$data.ltdtel}" placeholder="公司电话"   style="width:70%"/><a href="tel:{$data.ltdtel}" >拨打电话</a>
						</div>
					</div>
					<div class="Repair1">
						<div class="Repair1a">
							<img src="__XIAOHE__/images/Repair4.jpg" >
						</div>
						<div class="Repair1b">
							<input type="text" id="room" value="房间号：{$data.room}" placeholder="房间号"/>
						</div>
					</div>
					<div class="Repair2">
						<div class="Repair1a">
							<img class="Repair1aimg" src="__XIAOHE__/images/Repair5.jpg" >报修内容
						</div>
						<div class="Repair1c">
							<textarea rows="" cols=""   readonly="readonly" >{$data.content}</textarea>
						</div>
					</div>

					<img class="img-responsive"  id="photoshow1" src="{$data.image}">
					<?php $arr = explode(",",$data['images']);
						foreach($arr as $val){
							echo('<img class="img-responsive"  id="photoshow1" src="'.$val.'">');
						}
					?>
				
				{if condition="$data.status eq 2"}

					<div class="Repair2">
						<label class="radio-inline">
						  <input type="radio" name="grade" id="inlineRadio1" value="3" {if condition="$data['grade'] eq 3"}checked{/if}>满意
						</label>
						<label class="radio-inline">
						  <input type="radio" name="grade" id="inlineRadio2" value="2" {if condition="$data['grade'] eq 2"}checked{/if}>一般
						</label>
						<label class="radio-inline">
						  <input type="radio" name="grade" id="inlineRadio3" value="1" {if condition="$data['grade'] eq 1"}checked{/if}>不满意
						</label>
					</div>

					<div class="Repair2">
						<div class="Repair1a">
							<img class="Repair1aimg" src="__XIAOHE__/images/Repair5.jpg" >评价内容
						</div>
						<div class="Repair1c">
								<textarea rows="" cols="" id="appraise" {if condition="$data['grade'] neq 0"}readonly="readonly"{/if}>{$data.appraise}</textarea>
						</div>
					</div>
					{if condition="$data['grade'] eq 0"}
						<div class="Suggestions1e">
							<button id="xiaohe" type="button">提交评价</button>
						</div>

						<script type="text/javascript">
							$("#xiaohe").click(function(){
							    $.post("/api/yuye/pingjia",{
							    	id:{$data.id},
									grade:$('input:radio:checked').val(),//$("#grade").val()
									appraise:$("#appraise").val(),
									type:1,
								},function(data,status){
							        // alert("Data: " + data + "nStatus: " + status);
							        if(data.code>0){
							        	alert('评价成功');
							        	$('.Suggestions1e').hide();
							        	window.close();
							        }else{
							        	alert('评价失败：'+data.msg);
							        }
							    });
							});
						</script>
					{/if}

				{/if}
				</div>
			</div>
		</div>
	</body>
</html>
